home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_1.3 / Autodocs1.3 / DevicesL-Z / printer.doc < prev    next >
Text File  |  1988-10-16  |  40KB  |  1,035 lines

  1. TABLE OF CONTENTS
  2.  
  3. printer.device/CMD_FLUSH
  4. printer.device/CMD_INVALID
  5. printer.device/CMD_RESET
  6. printer.device/CMD_START
  7. printer.device/CMD_STOP
  8. printer.device/CMD_WRITE
  9. printer.device/PRD_DUMPRPORT
  10. printer.device/PRD_PRTCOMMAND
  11. printer.device/PRD_QUERY
  12. printer.device/PRD_RAWWRITE
  13. printer.device/PWrite
  14.  
  15.  
  16. printer.device/CMD_FLUSH                               printer.device/CMD_FLUSH
  17.  
  18.    NAME
  19.     CMD_FLUSH - abort all I/O requests (immediate)
  20.  
  21.    FUNCTION
  22.     CMD_FLUSH aborts all stopped I/O at the unit.
  23.  
  24.    IO REQUEST
  25.     io_Message    mn_ReplyPort set if quick I/O is not possible
  26.     io_Device    preset by the call to OpenDevice
  27.     io_Command    CMD_FLUSH
  28.     io_Flags    IOB_QUICK set if quick I/O is possible
  29.  
  30.  
  31. printer.device/CMD_INVALID                           printer.device/CMD_INVALID
  32.  
  33.    NAME
  34.     CMD_INVALID - invalid command
  35.  
  36.    FUNCTION
  37.     CMD_INVALID is always an invalid command, and sets the device
  38.     error appropriately.
  39.  
  40.    IO REQUEST
  41.     io_Message    mn_ReplyPort set if quick I/O is not possible
  42.     io_Command    CMD_INVALID
  43.     io_Flags    IOB_QUICK set if quick I/O is possible
  44.  
  45.  
  46. printer.device/CMD_RESET                               printer.device/CMD_RESET
  47.  
  48.    NAME
  49.     CMD_RESET - reset the printer
  50.  
  51.    FUNCTION
  52.     CMD_RESET resets the printer device without destroying handles
  53.     to the open device.
  54.  
  55.    IO REQUEST
  56.     io_Message    mn_ReplyPort set if quick I/O is not possible
  57.     io_Device    preset by the call to OpenDevice
  58.     io_Command    CMD_RESET
  59.     io_Flags    IOB_QUICK set if quick I/O is possible
  60.  
  61.  
  62. printer.device/CMD_START                               printer.device/CMD_START
  63.  
  64.    NAME
  65.     CMD_START - restart after stop (immediate)
  66.  
  67.    FUNCTION
  68.     CMD_START restarts the unit after a stop command.
  69.  
  70.    IO REQUEST
  71.     io_Message    mn_ReplyPort set if quick I/O is not possible
  72.     io_Device    preset by the call to OpenDevice
  73.     io_Command    CMD_START
  74.     io_Flags    IOB_QUICK set if quick I/O is possible
  75.  
  76.  
  77. printer.device/CMD_STOP                                 printer.device/CMD_STOP
  78.  
  79.    NAME
  80.     CMD_STOP - pause current and queued I/O requests (immediate)
  81.  
  82.    FUNCTION
  83.     CMD_STOP pauses all queued requests for the unit, and tries to
  84.     pause the current I/O request.  The only commands that will
  85.     be subsequently allowed to be performed are immediate I/O
  86.     requests, which include those to start, flush, and finish the
  87.     I/O after the stop command.
  88.  
  89.    IO REQUEST
  90.     io_Message    mn_ReplyPort set if quick I/O is not possible
  91.     io_Device    preset by the call to OpenDevice
  92.     io_Command    CMD_STOP
  93.     io_Flags    IOB_QUICK set if quick I/O is possible
  94.  
  95.  
  96. printer.device/CMD_WRITE                               printer.device/CMD_WRITE
  97.  
  98.    NAME
  99.       CMD_WRITE -- send output to the printer
  100.  
  101.    FUNCTION
  102.       This function causes a buffer of characters to be written to the
  103.       current printer port (usually parallel or serial).  The number of
  104.       characters is specified in io_Length, unless -1 is used, in which
  105.       case output is sent until a 0x00 is encountered.
  106.  
  107.       The Printer device, like the Console device, maps ANSI X3.64 style
  108.       7-bit printer control codes to the control code set of the current
  109.       printer.  The ANSI codes supported can be found below.
  110.  
  111.    NOTES
  112.       Not all printers will support all functions.  In particular you may
  113.       not assume that the MARGINS or TABS can be set.  Close to half the
  114.       supported printers don't fully implement one or the other.  If you
  115.       want the features of margins or tabs you will need to fake it
  116.       internally by sending out spaces. 
  117.  
  118.       Note that the printer device may have already sent out a "set
  119.       margins" command to the printer.  If you are faking your own
  120.       margins, be sure to cancel the old ones first.  (use the "aCAM"
  121.       command)
  122.  
  123.       Defaults are set up so that if a normal AmigaDOS text file
  124.       is sent to PRT:, it has the greatest chance of working. 
  125.       (AmigaDOS text files are defined as follows:)
  126.               tabs            - every 8
  127.               CR (0x0D)       - moves to start of current line
  128.               LF (0x0A)       - moves to start of next line
  129.  
  130.    IO REQUEST
  131.        io_Message      mn_ReplyPort set
  132.        io_Device       preset by OpenDevice
  133.        io_Unit         preset by OpenDevice
  134.        io_Command      CMD_WRITE
  135.        io_Length       number of characters to process, or if -1,
  136.                        process until 0x00 encountered
  137.        io_Data         pointer to block of data to process
  138.  
  139.    RESULTS
  140.        io_Error : if CMD_WRITE succeeded, then io_Error will be zero.
  141.               Otherwise io_Error will be non-zero.
  142.  
  143.    SEE ALSO
  144.        printer.h, parallel.device, serial.device, Preferences
  145.  
  146.  
  147.    ANSI X3.64 style COMMANDS
  148.  
  149.  aRIS         ESCc            hard reset
  150.  aRIN         ESC#1           initialize to defaults
  151.  aIND         ESCD            true linefeed (lf)
  152.  aNEL         ESCE            return,lf
  153.  aRI          ESCM            reverse lf              *
  154.  
  155.  aSGR0        ESC[0m          normal character set
  156.  aSGR3        ESC[3m          italics on
  157.  aSGR23       ESC[23m         italics off
  158.  aSGR4        ESC[4m          underline on
  159.  aSGR24       ESC[24m         underline off
  160.  aSGR1        ESC[1m          boldface on
  161.  aSGR22       ESC[22m         boldface off
  162.  aSFC         SGR30-39        set foreground color
  163.  aSBC         SGR40-49        set background color
  164.  
  165.  aSHORP0      ESC[0w          normal pitch
  166.  aSHORP2      ESC[2w          elite on
  167.  aSHORP1      ESC[1w          elite off
  168.  aSHORP4      ESC[4w          condensed on
  169.  aSHORP3      ESC[3w          condensed off
  170.  aSHORP6      ESC[6w          enlarged on
  171.  aSHORP5      ESC[5w          enlarged off
  172.  
  173.  aDEN6        ESC[6"z         shadow print on
  174.  aDEN5        ESC[5"z         shadow print off
  175.  aDEN4        ESC[4"z         doublestrike on
  176.  aDEN3        ESC[3"z         doublestrike off
  177.  aDEN2        ESC[2"z         Near Letter Quality (NLQ) on
  178.  aDEN1        ESC[1"z         NLQ off
  179.  
  180.  aSUS2        ESC[2v          superscript on
  181.  aSUS1        ESC[1v          superscript off
  182.  aSUS4        ESC[4v          subscript on
  183.  aSUS3        ESC[3v          subscript off
  184.  aSUS0        ESC[0v          normalize the line      *
  185.  aPLU         ESCL            partial line up         *
  186.  aPLD         ESCK            partial line down       *
  187.  
  188.  aFNT0        ESC(B           US char set (default)   or Font 0
  189.  aFNT1        ESC(R           French char set         or Font 1
  190.  aFNT2        ESC(K           German char set         or Font 2
  191.  aFNT3        ESC(A           UK char set             or Font 3
  192.  aFNT4        ESC(E           Danish I char set       or Font 4
  193.  aFNT5        ESC(H           Sweden char set         or Font 5
  194.  aFNT6        ESC(Y           Italian char set        or Font 6
  195.  aFNT7        ESC(Z           Spanish char set        or Font 7
  196.  aFNT8        ESC(J           Japanese char set       or Font 8
  197.  aFNT9        ESC(6           Norweign char set       or Font 9
  198.  aFNT10       ESC(C           Danish II char set      or Font 10
  199.  
  200.  aPROP2       ESC[2p          proportional on         *
  201.  aPROP1       ESC[1p          proportional off        *
  202.  aPROP0       ESC[0p          proportional clear      *
  203.  aTSS         ESC[n E         set proportional offset *
  204.  aJFY5        ESC[5 F         auto left justify       *
  205.  aJFY7        ESC[7 F         auto right justify      *
  206.  aJFY6        ESC[6 F         auto full justify       *
  207.  aJFY0        ESC[0 F         auto justify off        *
  208.  aJFY3        ESC[3 F         letter space (justify)  *
  209.  aJFY1        ESC[1 F         word fill(auto center)  *
  210.  
  211.  aVERP0       ESC[0z          1/8" line spacing
  212.  aVERP1       ESC[1z          1/6" line spacing
  213.  aSLPP        ESC[nt          set form length n
  214.  aPERF        ESC[nq          set perforation skip to n lines (n>0)
  215.  aPERF0       ESC[0q          perforation skip off
  216.  
  217.  aLMS         ESC#9           Left margin set         *
  218.  aRMS         ESC#0           Right margin set        *
  219.  aTMS         ESC#8           Top margin set          *
  220.  aBMS         ESC#2           Bottom margin set       *
  221.  aSTBM        ESC[Pn1;Pn2r    set T&B margins         *
  222.  aSLRM        ESC[Pn1;Pn2s    set L&R margin          *
  223.  aCAM         ESC#3           Clear margins
  224.  
  225.  aHTS         ESCH            Set horiz tab           *
  226.  aVTS         ESCJ            Set vertical tabs       *
  227.  aTBC0        ESC[0g          Clr horiz tab           *
  228.  aTBC3        ESC[3g          Clear all h tab         *
  229.  aTBC1        ESC[1g          Clr vertical tabs       *
  230.  aTBC4        ESC[4g          Clr all v tabs          *
  231.  aTBCALL      ESC#4           Clr all h & v tabs      *
  232.  aTBSALL      ESC#5           Set default tabs (every 8)
  233.  
  234.  aEXTEND      ESC[Pn"x        Extended commands
  235.                               This is a mechanism for printer drivers to
  236.                               support extra commands which can be called
  237.                               by ANSI control sequences
  238.  aRAW         ESC[Pn"r        Next 'Pn' chars are raw (ie. they are not
  239.                               parsed by the printer device, instead they
  240.                               are sent directly to the printer.
  241.  
  242.  
  243.  (*) indicates that sending this command may cause unexpected results
  244.      on a large number of printers.
  245.  
  246.  
  247. printer.device/PRD_DUMPRPORT                       printer.device/PRD_DUMPRPORT
  248.  
  249.    NAME
  250.     PRD_DUMPRPORT - dump the specified RastPort to a graphics printer.
  251.                                  
  252.    FUNCTION                             
  253.     Print a rendition of the supplied RastPort, using the supplied
  254.     ColorMap, position and scaling information, as specified in
  255.     the printer preferences.
  256.                                  
  257.    IO REQUEST
  258.     io_Message    mn_ReplyPort set if quick I/O is not possible.
  259.     io_Command    PRD_DUMPRPORT.
  260.     io_Flags    IOB_QUICK set if quick I/O is possible.
  261.     io_RastPort    ptr to a RastPort.
  262.     io_ColorMap    ptr to a ColorMap.
  263.     io_Modes    the 'modes' flag from a ViewPort structure,
  264.             (the upper word is reserved and should be zero).
  265.     io_SrcX        x offset into the RastPort to start printing from.
  266.     io_SrcY        y offset into the RastPort to start printing from.
  267.     io_SrcWidth    width of the RastPort to print (from io_SrcX).
  268.     io_SrcHeight    height of the RastPort to print (from io_SrcY).
  269.     io_DestCols    width of the printout in printer pixels.
  270.     io_DestRows    height of the printout in printer pixels.
  271.     io_Special    flag bits
  272.             (some of which pertain to DestCols and DestRows).
  273.             -if SPECIAL_MIL is set, then the associated
  274.              parameter is specified in thousandths of
  275.              an inch on the printer.  ie. if DestCols = 8000,
  276.              DestRows = 10500 and SPECIAL_MILROWS and
  277.              SPECIAL_MILCOLS is set then the printout would be
  278.              8.000 x 10.500 inches.
  279.             -if SPECIAL_FULL is set, then the specific dimension
  280.              is set to the maximum possible as determined
  281.              by the printer limits or the configuration
  282.              limits; whichever is less.
  283.             -if SPECIAL_FRAC is set, the parameter is
  284.              taken to be a longword binary fraction
  285.              of the maximum for that dimension.
  286.             -if all bits for a dimension are clear,
  287.              (ie. SPECIAL MIL/FULL/FRAC and ASPECT are NOT set)
  288.              then the parameter is specified in printer pixels.
  289.             -if SPECIAL_CENTER is set then the image will be
  290.              put between the left and right edge of the paper.
  291.             -if SPECIAL_ASPECT is set, one of the dimensions
  292.              may be reduced/expanded to preserve the aspect
  293.              ratio of the print.
  294.             -SPECIAL_DENSITY(1-7) this allows for a maximum of 7
  295.              different print densities.  DENSITY1 is the lowest
  296.              density and the default.
  297.             -SPECIAL_NOFORMFEED - this allows for the mixing of
  298.              text and graphics or multiple graphic dumps on page
  299.              oriented printers (usually laser jet printers).
  300.              When this flag is set the page will not be ejected
  301.              after a graphic dump.  If you perform another
  302.              graphic dump without this flag set OR close the
  303.              printer after printing text after a graphic dump,
  304.              the page will be ejected.
  305.             -if SPECIAL_TRUSTME is set then the printer specific
  306.              driver is instructed to not issue a reset command
  307.              before and after the dump.  If this flag is NOT
  308.              checked by the printer specific driver then setting
  309.              this flag has no effect.  Since we now recommend
  310.              that printer driver writers no longer issue a reset
  311.              command it is probably a safe idea to always set
  312.              this flag when calling for a dump.
  313.             -if SPECIAL_NOPRINT is set then the following is done:
  314.              Compute print size, set 'io_DestCols' and
  315.              'io_DestRows' in the calling program's 'IODRPReq'
  316.              structure and exit, DON'T PRINT.  This allows the
  317.              calling program to see what the final print size
  318.              would be in printer pixels.  Note that it modifies
  319.              the 'io_DestCols' and 'io_DestRows' fields of your
  320.              'IODRPReq' structure.  It also sets the print
  321.              density and updates the 'MaxXDots', 'MaxYDots',
  322.              'XDotsInch', and 'YDotsInch' fields of the
  323.              'PrinterExtendedData' structure.
  324.  
  325.     There following rules for the interpretation of io_DestRows and
  326.     io_DestCols that may produce unexpected results when they are
  327.     not greater than zero and io_Special is zero.  They have been
  328.     retained for compatability.  The user will not trigger these
  329.     other rules with well formed usage of io_Special.
  330.  
  331.     When io_Special is equal to 0, the following rules
  332.     (from the V1.1 printer.device, and retained for compatibility
  333.     reasons) take effect.  Remember, these special rules are
  334.     for io_DestRows and io_DestCols and only take effect
  335.     if io_Special is 0).
  336.  
  337.     a) DestCols>0 & DestRows>0 - use as absolute values.
  338.        ie. DestCols=320 & DestRows=200 means that the picture
  339.        will appear on the printer as 320x200 dots.
  340.     b) DestCols=0 & DestRows>0 - use the printers maximum number
  341.        of columns and print DestRows lines. ie. if DestCols=0
  342.        and DestRows=200 than the picture will appear on the
  343.        printer as wide as it can be and 200 dots high.
  344.     c) DestCols=0 & DestRows=0 - same as above except the driver
  345.        determines the proper number of lines to print based on
  346.        the aspect ratio of the printer. ie. This results in the
  347.        largest picture possible that is not distorted or inverted.
  348.        Note: As of this writing, this is the call made by such
  349.        program as DeluxePaint, GraphicCraft, and AegisImages.
  350.     d) DestCols>0 &DestRows=0 - use the specified width and the
  351.        driver determines the proper number of lines to print based
  352.        on the aspect ratio of the printer. ie. if you desire a
  353.        picture that is 500 pixels wide and aspect ratio correct,
  354.        use DestCols=500 and DestRows=0.
  355.     e) DestCols<0 or DestRows>0 - the final picture is either a
  356.        reduction or expansion based on the fraction
  357.        |DestCols| / DestRows in the proper aspect ratio.
  358.        Some examples:
  359.        1) if DestCols=-2 & DestRows=1 then the printed picture will
  360.           be 2x the AMIGA picture and in the proper aspect ratio.
  361.           (2x is derived from |-2| / 1 which gives 2.0)
  362.        2) if DestCols=-1 & DestRows=2 then the printed picture will
  363.           will be 1/2x the AMIGA picture in the proper aspect ratio.
  364.           (1/2x is derived from |-1| / 2 which gives 0.5)
  365.  
  366.    NOTES
  367.     The printer selected in preferences must have graphics
  368.     capability to use this command.  The error 'PDERR_NOTGRAPHICS'
  369.      is returned if the printer can not print graphics.
  370.  
  371.     Color printers may not be able to print black and white or
  372.     greyscale pictures -- specifically, the Okimate 20 cannot print
  373.     these with a color ribbon: you must use a black ribbon instead.
  374.     If the printer has an input buffer option, use it.
  375.     If the printer can be uni or bi directional, select
  376.     uni-directional; this produces a much cleaner picture.
  377.     Most printer drivers will attempt to set unidirectional
  378.     printing if it is possible under software control.
  379.  
  380.     Please note that the width and height of the printable area on
  381.     the printer is in terms of pixels and bounded by the folllowing:
  382.      a) WIDTH = (RIGHT_MARGIN - LEFT_MARGIN + 1) / CHARACTERS_PER_INCH
  383.      b) HEIGHT = LENGTH / LINES_PER_INCH
  384.        Margins are set by preferences.
  385.  
  386.     For BGR printer support, the YMC values in the printer
  387.     specific render.c functions equate to BGR respectively, ie.
  388.     yellow is blue, magenta is green, and cyan is red.
  389.                                  
  390.  Data Structures
  391.  ---------------
  392.  
  393.     The printer specific and non-specific data structures can be read
  394.     ONCE you have opended the printer device.  Here is a code fragment
  395.     to illustrate how to do just that.
  396.  
  397.     #include <exec/types.h>
  398.     #include <devices/printer.h>
  399.     #include <devices/prtbase.h>
  400.     #include <devices/prtgfx.h>
  401.  
  402.     struct IODRPReq PReq;
  403.     struct PrinterData *PD;
  404.     struct PrinterExtendedData *PED;
  405.  
  406.    open the printer device / if it opended...
  407.    if (OpenDevice("printer.device", 0, &PReq, 0) == NULL) {
  408.        get pointer to printer data
  409.        PD = (struct PrinterData *)PReq.io_Device;
  410.        get pointer to printer extended data
  411.        PED = &PD->pd_SegmentData->ps_PED;
  412.        let's see what's there
  413.        printf("PrinterName = '%s', Version=%u, Revision=%u\n",
  414.            PED->ped_PrinterName, PD->pd_SegmentData->ps_Version,
  415.            PD->pd_SegmentData->ps_Revision,);
  416.        printf("PrinterClass=%u, ColorClass=%u\n",
  417.            PED->ped_PrinterClass, PED->ped_ColorClass);
  418.        printf("MaxColumns=%u, NumCharSets=%u, NumRows=%u\n",
  419.            PED->ped_MaxColumns, PED->ped_NumCharSets, PED->ped_NumRows);
  420.        printf("MaxXDots=%lu, MaxYDots=%lu, XDotsInch=%u, YDotsInch=%u\n",
  421.            PED->ped_MaxXDots, PED->ped_MaxYDots,
  422.            PED->ped_XDotsInch, PED->ped_YDotsInch);
  423.        CloseDevice(&PReq);
  424.    }
  425.  
  426.  Preferences
  427.  -----------
  428.  
  429.     If you want the user to be able to access the printer preferences items
  430.  without having to run preferences (like DPAINT II's printer requestor),
  431.  here is what you do.  You can look at the printer's copy of preferences
  432.  by referring to 'PD->pd_Preferences' (the printer device MUST already be
  433.  opened at this point).  After you have this you could put up a requestor
  434.  and allow the user to change whatever parameters they wanted.
  435.  BEAR IN MIND THAT YOU ARE RESPONSIBLE FOR RANGE CHECKING THESE SELECTIONS!
  436.  Listed below are the printer preferences items and their valid values.
  437.  
  438.  PrintPitch         - PICA, ELITE, FINE.
  439.  PrintQuality       - DRAFT, LETTER.
  440.  PrintSpacing       - SIX_LPI, EIGHT_LPI.
  441.  PrintLeftMargin    - 1 to PrintRightMargin.
  442.  PrintRightMargin   - PrintLeftMargin to 999.
  443.  PaperLength        - 1 to 999.
  444.  PrintImage         - IMAGE_POSITIVE, IMAGE_NEGATIVE.
  445.  PrintAspect        - ASPECT_HORIZ, ASPECT_VERT.
  446.  PrintShade         - SHADE_BW, SHADE_GREYSCALE, SHADE_COLOR.
  447.  PrintThreshold     - 1 to 15.
  448.  PrintFlags         - CORRECT_RED, CORRECT_GREEN, CORRECT_BLUE, CENTER_IMAGE,
  449.                       IGNORE_DIMENSIONS, BOUNDED_DIMENSIONS,
  450.                       ABSOLUTE_DIMENSIONS, PIXEL_DIMENSIONS,
  451.                       MULTIPLY_DIMENSIONS, INTEGER_SCALING,
  452.                       ORDERED_DITHERING, HALFTONE_DITHERING.
  453.                       FLOYD_DITHERING, ANTI_ALIAS, GREY_SCALE2
  454.  PrintMaxWidth      - 0 to 65535.
  455.  PrintMaxHeight     - 0 to 65535.
  456.  PrintDensity       - 1 to 7.
  457.  PrintXOffset       - 0 to 255.
  458.  
  459.  Asynchronous I/O
  460.  ----------------
  461.  
  462.      The recommended way to do asynchronous i/o is...
  463.  
  464.  a) To send requests for i/o.
  465.  
  466.      struct IORequest *ioreq;
  467.      struct MsgPort *port;
  468.      UBYTE signal;
  469.  
  470.      port = ioreq->io_Message.mn_ReplyPort;
  471.      signal = port->mp_SigBit;
  472.  
  473.      SendIO(ioreq);  send request 
  474.      Wait(signal);  wait for completion (go to sleep) 
  475.      while ((Msg = GetMsg(port)) != NULL) {  get ALL messages
  476.      }
  477.  
  478.  b) To abort a previous request for i/o.
  479.  
  480.      struct IORequest *ioreq;
  481.  
  482.      AbortIO(ioreq);  abort request 
  483.      WaitIO(ioreq);  wait for reply 
  484.  
  485.      at this point you can re-use 'ioreq'.
  486.  
  487.      Note that in the above examples 'ioreq' could be any one of...
  488.      a) struct IOStdReq    a standard i/o request
  489.      b) struct IODRPReq    a dumprport i/o request
  490.      c) struct IOPrtCmdReq a printer command i/o request
  491.  
  492.      It is recommend that you do asynchronous i/o in your programs
  493.      and give the user a way of aborting all requests.
  494.  
  495.  
  496.          V1.3 Printer Driver Notes
  497.          -------------------------
  498.  
  499.      In general densities which use more than one pass should only be
  500.  used for B&W shade dumps.  They can be used for Grey-Scale or Color Shade
  501.  dumps BUT the output may tend to look muddy or dark.  Also multiple pass
  502.  Color dumps tend to dirty or smear the ribbon (ie. yellow will get
  503.  contaminated with the other colors on the ribbon; you've been warned).
  504.  
  505.  
  506.  Alphacom_AlphaPro_101
  507.  ---------------------
  508.  1. Daisywheel printer (text only).
  509.  
  510.  Brother_HR-15XL
  511.  ---------------
  512.  1. Daisywheel printer (text only).
  513.  
  514.  CalComp_ColorMaster
  515.  -------------------
  516.  1. Thermal transfer b&w/color printer (text and graphics).
  517.  2. Use Black ribbon for non-color dumps; Color ribbon for color dumps.
  518.  3. Linefeeds # of vertical dots printed.
  519.  4. Densitie(s) supported are 203x200(1) dpi.
  520.  5. This is a dual printer driver.  Select a PaperSize of 'Narrow Tractor'
  521.     for use with the ColorMaster; 'Wide Tractor' for use with the
  522.     ColorView-5912 (which uses 11 x 17 inch paper).
  523.  
  524.  CalComp_ColorMaster2
  525.  -------------------
  526.  1. Thermal transfer b&w/color printer (text and graphics).
  527.  2. Use Black ribbon for non-color dumps; Color ribbon for color dumps.
  528.  3. Linefeeds # of vertical dots printed.
  529.  4. Densitie(s) supported are 203x200(1) dpi.
  530.  5. This is a dual printer driver.  Select a PaperSize of 'Narrow Tractor'
  531.     for use with the ColorMaster; 'Wide Tractor' for use with the
  532.     ColorView-5912 (which uses 11 x 17 inch paper).
  533.  6. This driver is the same as the Calcomp_ColorMaster driver EXCEPT it is
  534.     approximately 2 times faster (during color dumps) and requires LOTS of
  535.     memory (up to 1,272,003 bytes for a full 8 x 10 inch (1600 x 2000 dot)
  536.     color dump).  Typically full-size (color) dumps are 1600 x 1149 dots and
  537.     require 730,767 bytes.  Memory requirements for the ColorView-5912
  538.     are up to 2,572,803 bytes for a full 10 x 16 inch (2048 x 3200 dot)
  539.     color dump.  Typically full-size (color) dumps are 2048 x 2155 dots and
  540.     require 1,732,623 bytes.  The memory requirements are 1/3 when doing a
  541.     non-color printout (on both the ColorMaster and ColorView).
  542.  
  543.  Canon_PJ-1080A
  544.  --------------
  545.  1. Ink jet b&w/color printer (text and graphics).
  546.  2. Linefeeds # of vertical dots printed.
  547.  3. Densitie(s) supported are 83x84(1) dpi.
  548.  
  549.  CBM_MPS1000
  550.  -----------
  551.  1. Dot matrix b&w printer (text and graphics).
  552.  2. Linefeeds # of vertical dots printed (-1/3 dot if PaperType = Single). *2
  553.  3. Density    XDPI    YDPI    XYDPI    Comments
  554.      1    120     72     8640
  555.      2    120    144    17280    two pass
  556.      3    240     72    17280            *1
  557.      4    120    216    25920    three pass
  558.      5    240    144    34560    two pass    *1
  559.      6    240    216    51840    three pass    *1
  560.      7    same as 6
  561.  
  562.  Diablo_630
  563.  ----------
  564.  1. Daisywheel printer (text only).
  565.  
  566.  Diablo_Advantage_D25
  567.  --------------------
  568.  1. Daisywheel printer (text only).
  569.  
  570.  Diablo_C-150
  571.  ------------
  572.  1. Ink jet b&w/color printer (text and graphics).
  573.  2. Always linefeeds 4 dots (limitation of printer).
  574.  3. A PaperSize of 'Wide Tractor' selects a maximum print width of
  575.     8.5 inches (for wide roll paper).
  576.  5. Densitie(s) supported are 120x120(1) dpi.
  577.  
  578.  EpsonQ (24-pin Epson compatible)
  579.  ------
  580.  1. Dot matrix b&w/color printer (text and graphics).
  581.  2. Drives all EpsonQ (LQ1500, LQ2500, etc.) compatible printers.
  582.  3. Linefeeds # of vertical dots printed.
  583.  4. Density    XDPI    YDPI    XYDPI    Comments
  584.      1     90    180    16200
  585.      2    120    180    21600
  586.      3    180    180    32400
  587.      4    360    180    64800    *1
  588.      5,6,7    same as 4
  589.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  590.     13.6 inches (for wide carriage printers).
  591.  6. A PaperType of 'Single' uses only 16 of the 24 pins, whereas a PaperType
  592.     of 'Fanfold' uses all 24 pins.  The 'Single' option is useful for those
  593.     printers which have a weak power supply and cannot drive all 24 pins
  594.     continuously.  If during a single pass of the print head you notice that
  595.     the top two thirds of the graphics are darker than the bottom one third
  596.     then you'll probably need to drop down to 16 pins.
  597.  
  598.  EpsonX[CBM_MPS-1250] (8/9-pin Epson compatible)
  599.  --------------------
  600.  1. Dot matrix b&w/color printer (text and graphics).
  601.  2. Drives all EpsonX (EX/FX/JX/LX/MX/RX, etc.) compatible printers.
  602.  3. Linefeeds # of vertical dots printed (-1/3 dot if PaperType = Single). *2
  603.  4. Density    XDPI    YDPI    XYDPI    Comments
  604.      1    120     72     8640
  605.      2    120    144    17280    two pass
  606.      3    240     72    17280            *1
  607.      4    120    216    25920    three pass
  608.      5    240    144    34560    two pass    *1
  609.      6    240    216    51840    three pass    *1
  610.      7    same as 6
  611.  
  612.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  613.     13.6 inches (for wide carriage printers).
  614.  6. Use this driver if you own a CBM_MPS-1250 (as it is EpsonX compatible).
  615.  
  616.  EpsonXOld (8/9-pin Epson compatible)
  617.  ---------
  618.  1. Dot matrix b&w printer (text and graphics).
  619.  2. Drives all very old EpsonX (EX/FX/JX/LX/MX/RX, etc.) compatible printers.
  620.  3. Linefeeds # of vertical dots printed.
  621.  4. Density    XDPI    YDPI    XYDPI    Comments
  622.      1     60    72     4320
  623.      2    120    72     8640    (double speed)            *1
  624.      3    120    72     8640
  625.      4    240    72    17280                    *1
  626.      5    120    72     8640    (for use on old Star printers)
  627.      6    240    72    17280    (for use on old Star printers)    *1
  628.      7    240    72    17280    (same as density 4)        *1
  629.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  630.     13.6 inches (for wide carriage printers).
  631.  6. Use this driver if the EpsonX driver doesn't work properly in graphics
  632.     or text mode on your EpsonX compatible printer.
  633.  
  634.  generic
  635.  -------
  636.  1. Text only printer.
  637.  
  638.  Howtek_Pixelmaster
  639.  ------------------
  640.  1. Plastic ink jet b&w/color printer (text and graphics).
  641.  2. Linefeeds # of vertical dots printed.
  642.  3. Density    XDPI    YDPI    XYDPI    Comments
  643.      1     80     80     6400
  644.      2    120    120    14400
  645.      3    160    160    25600
  646.      4    240    240    57600
  647.      5,6,7    same as 4
  648.  4. Maximum print area is 8.0 x 10.0 inches.
  649.  
  650.  HP_DeskJet
  651.  ----------
  652.  1. Ink jet non-color printer (text and graphics).
  653.  2. Linefeeds # of vertical dots printed.
  654.  3. Density    XDPI    YDPI    XYDPI    Comments
  655.      1     75     75     5625
  656.      2    100    100    10000
  657.      3    150    150    22500
  658.      4    300    300    90000
  659.      5,6,7    same as 4
  660.  4. Maximum print area is 8.0 x 10.0 inches.
  661.  
  662.  HP_LaserJet (LaserJet+/LaserJetII compatible)
  663.  -----------
  664.  1. Laser engine non-color printer (text and graphics).
  665.  2. Linefeeds # of vertical dots printed.
  666.  3. Density    XDPI    YDPI    XYDPI    Comments
  667.      1     75     75     5625
  668.      2    100    100    10000
  669.      3    150    150    22500
  670.      4    300    300    90000
  671.      5,6,7    same as 4
  672.  4. Maximum print area is 8.0 x 10.0 inches.
  673.  
  674.  HP_PaintJet
  675.  -----------
  676.  1. Ink jet b&w/color printer (text and graphics).
  677.  2. Linefeeds # of vertical dots printed.
  678.  3. Densitie(s) supported are 180x180(1) dpi.
  679.  
  680.  HP_ThinkJet
  681.  ----------
  682.  1. Ink jet non-color printer (text and graphics).
  683.  2. Linefeeds # of vertical dots printed.
  684.  3. Density    XDPI    YDPI    XYDPI    Comments
  685.      1     96    96     9216
  686.      2    192    96    18432
  687.      3,4,5,6,7    same as 4
  688.  
  689.  Imagewriter II (Imagewriter compatible)
  690.  --------------
  691.  1. Dot matrix b&w/color printer (text and graphics).
  692.  2. Linefeeds # of vertical dots printed.
  693.  3. Density    XDPI    YDPI    XYDPI    Comments
  694.      1     80     72     5760
  695.      2    120     72     8640
  696.      3    144     72    10368
  697.      4    160     72    11520
  698.      5    120    144    17280    two pass
  699.      6    144    144    20736    two pass
  700.      7    160    144    23040    two pass
  701.  
  702.  Nec_Pinwriter (24-wire Pinwriter compatible (P5/P6/P7/P9/P2200))
  703.  -------------
  704.  1. Dot matrix b&w/color printer (text and graphics).
  705.  2. Drives all Nec 24-wire Pinwriter compatible printers.
  706.  3. Linefeeds # of vertical dots printed.
  707.  4. Density    XDPI    YDPI    XYDPI    Comments
  708.      1     90    180     16200
  709.      2    120    180     21600
  710.      3    180    180     32400
  711.      4    120    360     43200    two pass
  712.      5    180    360     64800    two pass
  713.      6    360    180     64800
  714.      7    360    360    129600    two pass
  715.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  716.     13.6 inches (for wide carriage printers).
  717.  
  718.  Okidata_92
  719.  ----------
  720.  1. Dot matrix non-color printer (text and graphics).
  721.  2. Always linefeeds 7/72 inch (limitation of printer in graphics mode).
  722.  3. Densitie(s) supported are 72x72 dpi.
  723.  
  724.  Okidata_293I
  725.  ------------
  726.  1. Dot matrix b&w/color printer (text and graphics).
  727.  2. Drives 292 or 293 using the IBM interface module.
  728.  3. Linefeeds # of vertical dots printed (-1/2 dot if PaperType = Single) *3
  729.  4. Density    XDPI    YDPI    XYDPI    Comments
  730.      1    120    144    17280
  731.      2    240    144    34560
  732.      3    120    288    34560    two pass
  733.      4    240    288    69120    two pass
  734.      5,6,7    same as 4
  735.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  736.     13.6 inches (for wide carriage printers).
  737.  
  738.  Okimate-20
  739.  ----------
  740.  1. Thermal transfer b&w/color printer (text and graphics).
  741.  2. Use Black ribbon for non-color dumps; Color ribbon for color dumps.
  742.  3. Linefeeds an even # of dots printed. (ie. if 3 printed, 4 advanced).
  743.  4. Densitie(s) supported are 120x144(1) dpi.
  744.  
  745.  Quadram_QuadJet
  746.  ---------------
  747.  1. Ink jet b&w/color printer (text and graphics).
  748.  2. Linefeeds # of vertical dots printed.
  749.  3. Densitie(s) supported are 83x84(1) dpi.
  750.  
  751.  Qume_LetterPro_20
  752.  -----------------
  753.  1. Daisywheel printer (text only).
  754.  
  755.  Seiko_5300
  756.  ----------
  757.  1. Thermal transfer b&w/color printer (graphics only).
  758.  2. Use Black ribbon for non-color dumps; Color ribbon for color dumps.
  759.  3. Density    XDPI    YDPI    XYDPI    Comments
  760.      1    152    152    23104    drives CH-5301 printer
  761.      2    203    203    41209    drives CH-5312 printer
  762.      3    240    240    57600    drives CH-5303 printer
  763.      4, 5,6,7    same as 3
  764.      You must select the proper density to drive the specific printer
  765.      that you have.
  766.  4. This driver is not on the V1.3 Workbench or Extras disk.  It is
  767.     available on BIX and directly from Seiko.
  768.  
  769.  Seiko_5300a
  770.  -----------
  771.  1. Thermal transfer b&w/color printer (graphics only).
  772.  2. Use Black ribbon for non-color dumps; Color ribbon for color dumps.
  773.  3. Density    XDPI    YDPI    XYDPI    Comments
  774.      1    152    152    23104    drives CH-5301 printer
  775.      2    203    203    41209    drives CH-5312 printer
  776.      3    240    240    57600    drives CH-5303 printer
  777.      4, 5,6,7    same as 3
  778.      You must select the proper density to drive the specific printer
  779.      that you have.
  780.  4. This driver is the same as the Seiko_5300 driver EXCEPT it is
  781.     approximately 2 times faster (during color dumps) and requires LOTS of
  782.     memory (up to 1,564,569 bytes for a full 8 x 10 inch (1927 x 2173 dot)
  783.     color dump).  Typically full-size (color) dumps are 1927 x 1248 dots
  784.     and require 898,569 bytes.  The memory requirements are 1/3 when doing
  785.     a non-color printout.
  786.  5. This driver is not on the V1.3 Workbench or Extras disk.  It is
  787.     available on BIX and directly from Seiko.
  788.  
  789.  Tektronix_4693D
  790.  ---------------
  791.  1. Thermal transfer b&w/color printer (graphics only).
  792.  2. Densitie(s) supported are 300x300(1) dpi
  793.  3. Due to the way the printer images a picture none of the printer
  794.     preferences options affect the printout with the following exceptions:
  795.     a)Aspect - Horizontal, Vertical
  796.     b)Shade - B&W, Grey_Scale, Color
  797.     ...as a result of this only full size pictures can be printed.
  798.  4. Keypad menu option 3b COLOR ADJUSTMENT may be set from the keypad.
  799.     For normal prints this option should be set to "do not adjust".
  800.  5. Keypad menu option 3d VIDEO COLOR CORRECTION may be set from the keypad.
  801.     For normal prints this option should be set to "do not adjust".
  802.  6. Keypad menu option 5 BACKGROUND COLOR EXCHANGE may be set from the
  803.     keypad.  For normal prints this option should be set to "print colors
  804.     as recieved".
  805.  7. Once a picture has been printed additional copies may be printed
  806.     whithout resending by using the printers keypad.
  807.  8. This driver is not on the V1.3 Workbench or Extras disk.  It is
  808.     available on BIX and directly from Tektronix.
  809.  
  810.  Tektronix_4696
  811.  --------------
  812.  1. Ink jet b&w/color printer (text and graphics).
  813.  2. Always linefeeds 4 dots (limitation of printer).
  814.  3. Densities supported are 121x120(1), 242x120(black)(2) and
  815.     242x120(color)(3).
  816.     Selecting a density of 2 or higher really doesn't give you true 242 dpi
  817.     resolution since the printer only has 121 x dots per inch.
  818.     Instead this mode tells the printer to go into it's double pass mode.
  819.     Here, it outputs a line of dots at 121 dpi; and outputs the line again
  820.     (shifted to the right by 1/242 of an inch).  This produces much more
  821.     vibrate colors and gives the illusion of more resolution.  One drawback
  822.     is that large areas of solid colors (red, green, and blue specifically)
  823.     tend to over-saturate the paper with ink.  Density1 outputs all colors
  824.     in one pass.  Density 2 does a double pass on black.  Density 3 does a
  825.     double pass on all colors.  Density 1 to 3 correspond to the printer's
  826.     graphics printing modes 1 to 3 (respectively).
  827.  4. This driver is not on the V1.3 Workbench or Extras disk.  It is
  828.     available on BIX and directly from Tektronix.
  829.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  830.     9.0 inches (for wide roll paper).
  831.  
  832.  Toshiba_P351C (24-pin Toshiba compatible)
  833.  -------------
  834.  1. Dot matrix b&w/color printer (text and graphics).
  835.  2. Drives all Toshiba_P351C compatible printers.
  836.  3. Linefeeds # of vertical dots printed.
  837.  4. Density    XDPI    YDPI    XYDPI    Comments
  838.      1    180    180    32400
  839.      2    360    180    64800
  840.      3,4,5,6,7    same as 2
  841.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  842.     13.5 inches (for wide carriage printers).
  843.  
  844.  Toshiba_P351SX (24-pin Toshiba compatible)
  845.  --------------
  846.  1. Dot matrix b&w/color printer (text and graphics).
  847.  2. Drives all Toshiba_P351SX (321SL, 321SLC, 341SL) compatible printers.
  848.  3. Linefeeds # of vertical dots printed.
  849.  4. Density    XDPI    YDPI    XYDPI    Comments
  850.      1    180    180     32400
  851.      2    360    180     64800
  852.      3    180    360     64800    two pass
  853.      4    360    360    129600    two pass
  854.      5,6,7    same as 4
  855.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  856.     13.5 inches (for wide carriage printers).
  857.  
  858.  Xerox_4020
  859.  ----------
  860.  1. Ink jet b&w/color printer (text and graphics).
  861.  2. Always linefeeds 4 dots (limitation of printer).
  862.  3. This driver is IDENTICAL to the Diablo_C-150 driver EXCEPT it outputs
  863.     all black dots TWICE.  This is a special feature of this printer and
  864.     produces much more solid, darker black shades.  Please note that some
  865.     printing time overhead results from this feature; if you don't want it
  866.     use the Diablo_C-150 driver.
  867.  4. Densities supported are 121x120(1) and 242x240(2) dpi.
  868.     Selecting a density of 2 or higher really doesn't give you true 240 dpi
  869.     resolution since the Xerox_4020 only has 121 x dots per inch.
  870.     Instead this mode tells the printer to go into it's pseudo 240 dpi mode.
  871.     Here, it outputs a line of dots at 121 dpi; moves the paper up 1/240 of
  872.     an inch and outputs the line again (shifted to the right by 1/240 of an
  873.     inch).  This produces much more vibrate colors and gives the illusion
  874.     of more resolution.  One drawback is that large areas of solid colors
  875.     (red, green, and blue specifically) tend to over-saturate the paper with
  876.     ink.
  877.  5. A PaperSize of 'Wide Tractor' selects a maximum print width of
  878.     9.0 inches (for wide roll paper).
  879.  
  880.  
  881.  Notes
  882.  -----
  883.  
  884.  *0 - on most printers friction fed paper tends to produce better looking
  885.       (ie. less horizontal banding) graphic dumps than tractor fed paper.
  886.  
  887.  *1 - in this mode the printer cannot print two consecutive dots in a row.
  888.       It is recommended that you only use this density for B&W Shade dumps.
  889.  
  890.  *2 - only when 72 YDPI is selected.  This option is useful if you notice
  891.       tiny white horizontal strips in your printout.
  892.  
  893.  *3 - only when 144 YDPI is selected.  This option is useful if you notice
  894.       tiny white horizontal strips in your printout.
  895.  
  896.  
  897. printer.device/PRD_PRTCOMMAND                     printer.device/PRD_PRTCOMMAND
  898.  
  899.    NAME
  900.        PCPRD_PRTCOMMAND -- send a command to the printer
  901.  
  902.    FUNCTION 
  903.       This function sends a command to either the parallel or serial
  904.       device.  The printer device maps this command to the control
  905.       code set of the current printer.  The commands supported can
  906.       be found with the printer.device/Write command.  All printers
  907.       may not support all functions.
  908.  
  909.    IO REQUEST IOPrtCmdReq
  910.        io_Message      mn_ReplyPort set
  911.        io_Device       preset by OpenDevice
  912.        io_Unit         preset by OpenDevice
  913.        io_Command      PRD_PRTCOMMAND
  914.        io_PrtCommand   the actual command number
  915.        io_Parm0        parameter for the command
  916.        io_Parm1        parameter for the command
  917.        io_Parm2        parameter for the command
  918.        io_Parm3        parameter for the command
  919.  
  920.    RESULTS
  921.        Errors: if the PRD_PRTCOMMAND succeeded, then io_Error will be zero.
  922.        Otherwise io_Error will be non-zero.  An error of -1 indicates that
  923.        the command is not supported by the current printer driver.  This
  924.        could be used to check if the connected printer supports a particular
  925.        command (italics for example).
  926.  
  927.    SEE ALSO
  928.        printer.device/Write printer.h, parallel.device, Preferences
  929.  
  930.  
  931. printer.device/PRD_QUERY                               printer.device/PRD_QUERY
  932.  
  933.    NAME
  934.     PRD_QUERY - query printer port/line status
  935.  
  936.    FUNCTION
  937.     This command returns the status of the printer port's lines and
  938.     registers.  Since the printer port uses either the serial or
  939.     parallel port for i/o, the actual status returned is either the
  940.     serial or parallel port's status.
  941.  
  942.    IO REQUEST
  943.     io_Message    mn_ReplyPort set if quick I/O is not possible
  944.     io_Device    preset by the call to OpenDevice
  945.     io_Command    PRD_QUERY
  946.     io_Data        ptr to 2 UBYTES where result will be stored.
  947.  
  948.    RESULTS
  949.      io_Data          BIT  ACTIVE  FUNCTION (SERIAL DEVICE)
  950.  
  951.              LSB       0    low    reserved
  952.                        1    low    reserved
  953.                        2    low    reserved
  954.                        3    low    Data Set Ready
  955.                        4    low    Clear To Send
  956.                        5    low    Carrier Detect
  957.                        6    low    Ready To Send
  958.                        7    low    Data Terminal Ready
  959.              MSB       8    high   read buffer overflow
  960.                        9    high   break sent (most recent output)
  961.                       10    high   break received (as latest input)
  962.                       11    high   transmit x-OFFed       
  963.                       12    high   receive x-OFFed       
  964.                    13-15           reserved
  965.  
  966.  
  967.      io_Data          BIT  ACTIVE  FUNCTION (PARALLEL DEVICE)
  968.  
  969.                        0     hi     printer busy (offline)
  970.                        1     hi     paper out
  971.                        2     hi     printer selected
  972.                      (WARNING: the bit 2 line is also connected
  973.                       to the serial port's ring indicator pin
  974.                       on the A500 and A2000)
  975.                      3-7            reserved
  976.  
  977.      io_Actual       1-parallel, 2-serial
  978.  
  979.  
  980. printer.device/PRD_RAWWRITE                         printer.device/PRD_RAWWRITE
  981.  
  982.    NAME
  983.     PRD_RAWWRITE - transparent write command
  984.  
  985.    FUNCTION
  986.     This is a non standard write command that performs no
  987.     processing on the data passed to it.
  988.  
  989.    IO REQUEST
  990.     io_Message    mn_ReplyPort set if quick I/O is not possible
  991.     io_Command    PRD_RAWWRITE
  992.     io_Flags    IOB_QUICK set if quick I/O is possible
  993.     io_Length    the number of bytes in io_Data
  994.     io_Data        the raw bytes to write to the printer
  995.  
  996.  
  997. printer.device/PWrite                                     printer.device/PWrite
  998.  
  999.    NAME
  1000.     PWrite - internal write to printer port
  1001.  
  1002.    SYNOPSIS
  1003.     error = (*PrinterData->pd_PWrite)(buffer, length);
  1004.     D0                                  A0      D0
  1005.  
  1006.    FUNCTION
  1007.     PWrite writes 'length' bytes directly to the printer.  This
  1008.     function is generally called by printer drivers to send
  1009.     their buffer(s) to the printer.
  1010.  
  1011.     This function is accessed by referencing off the PrinterData (PD)
  1012.     structure.  Below is a code fragment to show how to do get access
  1013.     to a pointer to the PrinterData (PD) structure.
  1014.  
  1015.     #include <exec/types.h>
  1016.     #include <devices/printer.h>
  1017.     #include <devices/prtbase.h>
  1018.  
  1019.     struct IODRPReq PReq;
  1020.     struct PrinterData *PD;
  1021.     struct PrinterExtendedData *PED;
  1022.  
  1023.     /* open the printer device (any version); if it opened... */
  1024.     if (OpenDevice("printer.device", 0, &PReq, 0) == NULL) {
  1025.  
  1026.         /* get pointer to printer data strcuture */
  1027.         PD = (struct PrinterData *)PReq.io_Device;
  1028.  
  1029.         /* write something directly to the printer */
  1030.         (*PD->pd_PWrite)("Hello world\n", 12);
  1031.  
  1032.         CloseDevice(&PReq); /* close the printer device */
  1033.     }
  1034.  
  1035.